#ifndef _DLG_MSG_H_
#define _DLG_MSG_H_

#include <QDialog>
#include <QLineEdit>

QT_BEGIN_NAMESPACE
class QCheckBox;
class QLabel;
class QErrorMessage;
class QTextEdit;
QT_END_NAMESPACE

struct pt {
    int x;
    int y;
};

class tsc_dlg : public QDialog
{
    Q_OBJECT

public:
    tsc_dlg(QWidget *parent = 0);
    void onAppend(char *str);
    void onShow();
    void onHide();
    void draw_cross(int index, int x, int y);
    void do_update();
signals:
    void sigShow();
    // void sigHide();
    // void sigAppend(char *str);
    

private slots:
    // void doAppend(char *str);
    void doShow();
    // void doHide();
    void set_net();
    void paintEvent(QPaintEvent *event);

private:
    QLabel *integerLabel;
    QLabel *label_ip;
    QLabel *label_mask;
    QLabel *label_gw;
    QLabel *label_dns;

    QLineEdit *edit_ip;
    QLineEdit *edit_mask;
    QLineEdit *edit_gw;
    QLineEdit *edit_dns;

    QTextEdit *textEdit;
    int cross_x;
    int cross_y;
    int ts_index;
};

#endif
